package com.cetc.common.validate;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * Created by Administrator on 2018/9/21.
 */
@Constraint(validatedBy = {IntegerTypeValidator.class }) //指定校验器
@Documented
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
public @interface IntegerType {
    int min() default 0;

    int max() default 2147483647;

    String message() default "只能为整数";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
